home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-3417 / gfa_prog.s / gfalevel.txt < prev    next >
Text File  |  1989-04-05  |  3KB  |  56 lines

  1. LEVEL PEAK IN GFA
  2.  
  3. LEVEL PEAK INDICATORS IN GFA.
  4.  
  5. Well this is the second part of the GFA_PROGS. In the first part you can
  6. see how to make soundchip music play in GFA. But there is more, in lots of
  7. demo's and even in this magazine you can see peak level indicators. You
  8. can also find them on a cassette recorder or tuner/amplifier. So here is
  9. your change to make them in GFA basic to see what your music is doing.
  10. The listing below is just a part of the wholw listing, the rest of it 
  11. is the other part of the text YAMAHA CHIP MUSIC. But to make things a
  12. bit easier i have put the complete list again in the folder.
  13. I would say take a good look at the listing below...
  14.  
  15. PROCEDURE level_bars
  16.   CLS                                   ! clear the screen
  17.   FOR t=0 TO 15                         ! for_next loop
  18.     BOX 0,16,8,15-t                     ! draw a box in 16 different hights
  19.     GET 0,0,8,16,ba$(t)                 ! get the different hights
  20.   NEXT t                                ! draw next box
  21.   CLS                                   ! clear screen again
  22. RETURN
  23. '
  24. PROCEDURE bars
  25.   WHILE NOT INP?(2)                      ! if no key press then.. <---
  26.     PUT 0,30,ba$(XBIOS(28,0,8))          ! put volume bar channel 1   |
  27.     PUT 10,30,ba$(XBIOS(28,0,9))         ! put volume bar channel 2   |
  28.     PUT 20,30,ba$(XBIOS(28,0,10))        ! put volume bar channel 3   |
  29.     PUT 30,30,ba$((XBIOS(28,0,0) DIV 16))! put tone bar channel 1     |
  30.     PUT 40,30,ba$((XBIOS(28,0,2) DIV 16))! put tone bar channel 2     |
  31.     PUT 50,30,ba$((XBIOS(28,0,4) DIV 16))! put tone bar channel 3     |
  32.                                                                       |
  33.                                                                       |
  34.   The first 3 are volume bars, always from 0 to 15.                   |
  35.   The last 3 are tone hights, from 0 to 255. We only got 16 level     |
  36.    bars so we DIV it by 16 and then it works with 16 level bars.      |
  37.                                                                       |  
  38.                                                                       |
  39.   WEND                                   ! and back to above      -----
  40. RETURN                                   ! back to main loop...'
  41.  
  42.  
  43. So i hope you understand all this, in the folder GFA_PROG.S is a file
  44. called GFA_PEAK.LST and you can MERGE it in GFA basic 3.xx. Well i
  45. hope you have some us for it, an if you have some nice routines in GFA
  46. please send them in so other readers can use them. We all have to help
  47. one an other to get the best out of GFA basic, oke ???
  48. '
  49. If you still have some questions about it then write to us, and maybe
  50. we write you back or will write about it in the next issue of the
  51. D.B.A. magazine.
  52.  
  53.                         Keep on Programming...
  54.  
  55.                                 Bonus Software
  56.